package cn.usian.service.impl;

import cn.usian.dao.UserDao;
import cn.usian.pojo.User;
import cn.usian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;


    //添加
    @Override
    public void addUser(User user) {
         userDao.addUser(user);
    }
    //查询
    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }
    //删除
    @Override
    public void delete(Integer uid) {
        userDao.delete(uid);
    }

    @Override
    public User findById(Integer uid) {
        return userDao.findById(uid);
    }

    @Override
    public void updateUser(User user) {
        userDao.updateUser(user);
    }
}
